Global options for outputs/formatting
Plain text formatting allows for conversion to multiple document types
knit button or command/CTRL-shift-KRender files in the console with rmarkdown::render(file, output_format)
Option to create PDF from HTML: pagedown::chrome_print(file)
\(\LaTeX\) templates
Word Document
These files go in the same place as your .Rmd
Examples from my stats homework
Examples from my Psychonomics poster
# Make dataframe with installed packages
pkgs <- installed.packages() %>%
as.data.frame()
# Pull posterdown package
pstr <- pkgs %>%
select(Package, LibPath, Version, Depends, Imports) %>%
dplyr::filter(Package == "posterdown")
# Make table
kable(pstr) %>%
kable_styling(bootstrap_options = "condensed",
font_size = 18)| Package | LibPath | Version | Depends | Imports |
|---|---|---|---|---|
| posterdown | /Library/Frameworks/R.framework/Versions/3.5/Resources/library | 1.0 | NA | pagedown, rmarkdown, yaml |
:: for unloaded packages and conflictsWarnings won’t stop your document from compiling, but generally indicate that you should change something in your code
Chunk error
Markdown/YAML error
Running a chunk executes the code in the console and adds the output to your R environment
Your R environment is separate from the environment created by “knitting” a document
## [1] 100
rm(ls = list())Stack Overflow is your friend!
scholar package for automatically downloading citations from Google Scholardevtools package for installing packages/plug-ins from GitHub (e.g., papaja)rmarkdown) in library with update.packages(path)install.packages(package)updateR packageassign() function for dynamic variable namesggplot parameters in a list()source()%notin%